﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EnterList.aspx.cs" Inherits="MaluJg.web.Move.EnterList" %>

<%@ Register Src="~/Common/MovePager.ascx" TagName="MPager" TagPrefix="wsc" %>
<%@ Register Src="~/Stats/yearselect.ascx" TagName="yearselect" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>
        <%=Year %>年动迁进展情况表</title>
    <link href="../Style/CSS/css.css" rel="stylesheet" type="text/css" />
   

    <script type="text/javascript" src="../Scripts/jquery.js"></script>

    <script type="text/javascript" src="../Scripts/common.js"></script>

    <script>
        function addProject() {
            window.showModalDialog('AddM.aspx?nocache=' + Math.random(), '', "dialogWidth:480px;dialogHeight:360px;status:yes;resizable:no");
            window.location = window.location;
           
        }
        function openEdit(id) {
            window.showModalDialog('AddM.aspx?MID=' + id + '&nocache=' + Math.random(), '', "dialogWidth:480px;dialogHeight:360px;status:yes;resizable:no");
            window.location = window.location;
        }

    </script>

</head>
<body>
    <form id="form1" runat="server">
    <table cellspacing="0" cellpadding="0" border="0" class="" width="100%">
        <tr class="TitleBar">
            <td class="MainTitle">
                <%=Year %>年动迁企业汇总表
            </td>
             <td align="right">
                <a href="#" onclick="addProject();">
                    <img src="/UI%20Standard/icon/action/add.gif" align="absmiddle" />&nbsp;新增</a>&nbsp;
            </td>
        </tr>
    </table>
    <uc1:yearselect runat="server" ID="yearselect1"></uc1:yearselect>
    <div id="divMain">
        <table class="PageGridHeader01" cellspacing="0" cellpadding="0" border="1" id="tblList"
            align="center" width="100%">
            <tr>
                <td width="30" rowspan="2" align="center">
                    序号
                </td>
                <td rowspan="2" align="center">
                    企业名称
                </td>
                <td width="90" align="center" >
                    编辑
                </td>
                <td width="90" align="center" >
                    删除
                </td>
            </tr>
        </table>
        <table class="MainInfolist" cellspacing="0" cellpadding="0" border="0" width="100%">
            <asp:Repeater runat="server" ID="rptList" OnItemDataBound="rptItem_ItemDataBound" OnItemCommand="rptItem_OnItemCommand">
                <ItemTemplate>
                    <tr>
                        <td width="30">
                            <%# Container.ItemIndex + 1 %>
                        </td>
                        <td>
                            <a href="MFrame.aspx?mid=<%#Eval("id")%>" target="_blank">
                                <%#Eval("EnterpriseName")%></a>
                        </td>
                        <td width="90" height="22" align="center" bgcolor="#FFFFFF">
                            <a href="#" onclick="openEdit('<%# DataBinder.Eval(Container.DataItem, "ID") %>');">
                                编辑</a>
                        </td>
                        <td width="90" height="22" align="center" bgcolor="#FFFFFF">
                            <asp:LinkButton ID="lbtnDelete" runat="server" OnClientClick="return window.confirm('确认删除?');">删除</asp:LinkButton>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </table>
        <wsc:MPager ID="pgList" runat="server" OnPreRender="pgList_OnPreRender" />
    </div>
    <br />

    <script>        function PageResize() {
            var height = document.getElementById('tblList').clientHeight;
            var MainFrame = document.getElementById("divMain");
            var _height = document.documentElement.clientHeight;
            if (_height < height + 100)
                _height = height + 100;
            MainFrame.style.height = _height - 100 + "px";

        }
        PageResize();
        window.onresize = PageResize;
        
    </script>

    </form>
</body>
</html>
